package org.irri.smta.ui.converter;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.inject.Inject;
import javax.inject.Named;

import org.irri.smta.global.GlobalBean;

public abstract class ConverterBase implements Converter {

	@Inject
	@Named("globalBean")
	private GlobalBean globalBean;

	public GlobalBean getGlobalBean() {
		return globalBean;
	}

	@Override
	public abstract Object getAsObject(FacesContext context,
			UIComponent component, String value);

	@Override
	public abstract String getAsString(FacesContext context,
			UIComponent component, Object value);

}
